package com.aob.service.impl;

import com.aob.pojo.Shopcar;
import com.aob.mapper.ShopcarMapper;
import com.aob.service.ShopcarService;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * @Desc: 接口实现类
 * @Author: ChenWenJie
 */
@Service("shopcarService")
public class ShopcarServiceImpl implements ShopcarService {

    @Autowired(required = false)
    private ShopcarMapper shopcarMapper;

    public ShopcarMapper getShopcarMapper() {
        return shopcarMapper;
    }

    public void setShopcarMapper(ShopcarMapper shopcarMapper) {
        this.shopcarMapper = shopcarMapper;
    }

    @Override
    public int add(Shopcar shopcar) {
        return shopcarMapper.add(shopcar);
    }

    @Override
    public int deleteShopcarById(Integer id) {
        return shopcarMapper.deleteShopcarById(id);
    }

    @Override
    public int update(Shopcar shopcar) {
        return shopcarMapper.update(shopcar);
    }

    @Override
    public int getShopcarCount(Map<String, Object> map) {
        return shopcarMapper.getShopcarCount(map);
    }

    @Override
    public Shopcar getShopcarById(Integer id) {
        return shopcarMapper.getShopcarById(id);
    }

    @Override
    public List<Shopcar> getShopcarListByObj(Shopcar shopcar) {
        return shopcarMapper.getShopcarListByObj(shopcar);
    }

    @Override
    public List<Shopcar> getShopcarPageByMap(Map<String, Object> map) {
        return shopcarMapper.getShopcarPageByMap(map);
    }

    @Override
    public Shopcar getShopcarByMap(Map<String, Object> map) {
        return shopcarMapper.getShopcarByMap(map);
    }
}
